package com.huawei.appmarket.service.settings.card;

import android.content.ClipData;
import android.content.ClipboardManager;
import android.content.Context;
import android.content.Intent;
import android.view.View;
import com.huawei.appgallery.foundation.ui.framework.cardkit.bean.CardBean;
import com.huawei.appmarket.service.settings.view.widget.EnterLayout;
import o.cgz;
import o.BaseAlertDialog;
import o.BaseAlertDialog.a;
import o.cks;
import o.der.d;
import o.der.f;
import o.evx;

public class AboutWeiXinAccountCard extends BaseAboutCard {
    private BaseAlertDialog ˊ;
    protected BaseAlertDialog ˋ;
    protected EnterLayout ˎ;
    private evx ˏ = new evx(this) {
        final /* synthetic */ AboutWeiXinAccountCard ˊ;

        {
            this.ˊ = r1;
        }

        public void ˋ(View view) {
            this.ˊ.ॱॱ();
            this.ˊ.ˋ();
        }
    };

    public AboutWeiXinAccountCard(Context context) {
        super(context);
    }

    public cgz ˏ(View view) {
        super.ˏ(view);
        this.ˎ = (EnterLayout) view.findViewById(d.ˌॱ);
        this.ˎ.setTitle(Integer.valueOf(f.ˏॱ));
        this.ˎ.setMemo(Integer.valueOf(f.ˋॱ));
        this.ˎ.setOnClickListener(this.ˏ);
        return this;
    }

    private void ˋ() {
        if (ˏ("com.tencent.mm")) {
            ˊ();
        } else {
            ʼ();
        }
    }

    private void ˊ() {
        this.ˊ = BaseAlertDialog.ˋ(this.ᐝ, null, this.ᐝ.getString(f.ॱﾞ));
        this.ˊ.ॱ();
        this.ˊ.ॱ(a.ˋ, f.ॱꜞ);
        this.ˊ.ˎ(new cks(this) {
            final /* synthetic */ AboutWeiXinAccountCard ˋ;

            {
                this.ˋ = r1;
            }

            public void enableNetworking() {
                Intent launchIntentForPackage = this.ˋ.ॱ.getLaunchIntentForPackage("com.tencent.mm");
                if (launchIntentForPackage != null) {
                    this.ˋ.ᐝ.startActivity(launchIntentForPackage);
                }
            }

            public void upgrade() {
            }

            public void ˋ() {
            }
        });
    }

    private void ʼ() {
        if (this.ˋ != null) {
            this.ˋ.ˏ();
            this.ˋ = null;
        }
        this.ˋ = BaseAlertDialog.ˋ(this.ᐝ, null, this.ᐝ.getString(f.ـॱ));
        this.ˋ.ˎ(new cks(this) {
            final /* synthetic */ AboutWeiXinAccountCard ˏ;

            {
                this.ˏ = r1;
            }

            public void enableNetworking() {
                this.ˏ.ˎ("com.tencent.mm");
            }

            public void upgrade() {
            }

            public void ˋ() {
            }
        });
        this.ˋ.ॱ();
        this.ˋ.ॱ(a.ˋ, f.י);
    }

    private void ॱॱ() {
        ((ClipboardManager) this.ᐝ.getSystemService("clipboard")).setPrimaryClip(ClipData.newPlainText("about_weixinName", this.ᐝ.getString(f.ˋॱ)));
    }

    public void ˏ(CardBean cardBean) {
        super.ˏ(cardBean);
    }
}
